const { fork } = require('child_process');

const cp = fork('./fork-child.js');

cp.send({a:"hello", b: "world"});

cp.on("close", ()=>{
  console.log('master: child closed!');
})

cp.on("message", (data)=>{
  console.log('master: message from child', data);

});
